public class Test {
    public static void main(String[] args){
        BinarySearchTree binarySearchTree = new BinarySearchTree();
        binarySearchTree.insert(10);
        binarySearchTree.insert(5);
        binarySearchTree.insert(15);
        binarySearchTree.insert(9);
        binarySearchTree.insert(3);
        binarySearchTree.insert(18);

        BinarySearchTree.TreeNode ret = binarySearchTree.search(10);
        System.out.println(ret.val);

        binarySearchTree.remove(10);

    }
}
